// utils/api.js
import Request from './request';

// 封装获取项目信息接口
const getProjectInfo = (data) => {
    return Request({
        url: '/api/appInfo',
        method: 'GET',
        data
    });
};

const getUserInfo = (data) => {
    return Request({
        url: '/api/user/info',
        method: 'GET',
        data
    });
};

const getWxUserInfo = (data) => {
    return Request({
        url: '/api/user/wxInfo',
        method: 'GET',
        data
    });
};

// 封装提交表单接口
const submitForm = (data) => {
    return Request({
        url: '/api/user/submit',
        method: 'POST',
        data
    });
};
const getLaborCompanyList = ( data) => {
    return Request({
        url: '/api/laborCompany/list',
        method: 'GET',
        data
    });
};

const getJobTypeList = ( data) => {
    return Request({
        url: '/api/jobType/list',
        method: 'GET',
        data
    });
};
const getLoginInfo = ( data) => {
    return Request({
        url: '/api/user/getLoginInfo',
        method: 'GET',
        data
    });
};
const submitUserAuth = (data) => {
    return Request({
        url: '/api/user/auth',
        method: 'POST',
        data
    });
};

export {
    getProjectInfo,
    submitForm,
    getLaborCompanyList,
    getJobTypeList,
    getLoginInfo,
    getUserInfo,
    submitUserAuth,
    getWxUserInfo
};